package org.jsola.hr.web;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.jsola.core.Result;
import org.jsola.hr.dto.HrCustomerDetailsAddDTO;
import org.jsola.salary.entity.CustomerDetailsDO;
import org.jsola.salary.vo.CustomerDetailsVO;

import java.util.List;

/**
 * 客户明细表
 *
 * @author JanusMix
 */
@Api(tags = "salary-客户明细表")
public interface IHrCustomerDetailsControllerAPI {

    /**
     * 根据公司Ids新增客户明细表
     *
     * @param hrCustomerDetailsAddDTO 新增客户明细表DTO
     * @return 客户明细表详情信息
     */
    @ApiOperation(value = "根据公司Ids新增客户明细表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "hrCustomerDetailsAddDTO", dataType = "HrCustomerDetailsAddDTO", value = "新增客户明细表", paramType = "body")
    })
    Result<List<CustomerDetailsVO>> saveByCompanyIds(HrCustomerDetailsAddDTO hrCustomerDetailsAddDTO);

    /**
     * 批量删除客户明细表，逻辑删除
     *
     * @param customerDetailsIds 客户明细表id集合
     * @return 删除数量
     */
    @ApiOperation(value = "批量删除客户明细表，彻底删除")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "customerDetailsIds", dataType = "Long[]", value = "客户明细表id数组", paramType = "body", allowMultiple = true)
    })
    Result<Integer> deleteBatch(Long[] customerDetailsIds);

    /**
     * 查询创建的最后一个月客户明细
     *
     * @return 公司创建的最后一个月汇总
     */
    @ApiOperation(value = "查询创建的最后一个月客户明细")
    Result<CustomerDetailsDO> selectLastOne();
}